The present invention relates to the testing of a USB hub.
The Universal Serial Bus (USB) is a peripheral bus specification developed by PC and telecom industry leaders. Under the specification, the USB allows the plug-and-play capability of computer peripherals outside the PC case. The capability eliminates the need to install interface card into dedicated computer slots and reconfigure the system each time a peripheral is attached or detached from a PC. The USB specification is described in detail in the Universal Serial Bus Specification, Revision 1.0 published Jul. 15, 1996.
As shown in FIG. 1, the computer system 10 connects USB devices with a USB host 12, i.e. a computer system. There are two types of USB devices: the hub 16 and the function 14. A hub 16 is device which provides additional attachment points for the Computer system. A function 14 provides capabilities to the computer system. For instance, a keyboard, a mouse, an ISDN connection, a scanner, an audio device etc. Generally, there are two ports of attachment in the USB host 12. The port 1 connects to hub 16 by the wire 18. The port 2 connects to the function 14 by the wire 13. HUB 16 connects to the functions 14 by the wires 15 respectively. Under the protocol of USB standard, the functions 14 are classified into mainly three types of device. The first one is the type of a human-interface device (HID), i.e. keyboard, mouse, or, alternately, an interrupt device. The second one is the type of a bulk device, i.e. a scanner, which places strict requirement on accuracy of each data bits transmitted. The third one is the type of an isochrome device, i.e. an audio device, which does not place strict requirement on accuracy of each data bits transmitted. The detailed definitions of these types of device may be referred to in the Specification mentioned above.
Hub 16 are therefore a key element in the plug-and-play architecture of computer system 10, and is wiring concentrator which enable the multiple attachment characteristics of USB. The upstream port of a hub 16 connects the hub 16 towards the host 12. Each of the downstream ports of a hub 16 allows connection to another hub or function 14. Hubs 16 detect the attachment and detachment of a USB device 14 at each downstream port and enable the distribution of power to these down stream USB devices 14. The wires 13, 15 and 18 all named as USB lines.
The present invention relates to the testing of a USB hub 16. With one conventional approach regarding the testing of a USB hub 16, all testing commands and return status are transmitted through the USB lines 15 and the hub 16 between the host 12 and the USB devices 14. However, since the hub 16 is a target to be tested, and as the USB command is issued to the downstream devices 14 via the USB line 15 and hub 16, the locations of errors can not be accurately determined as errors are encountered. Furthermore, some conventional testing methods are performed under the DOS environment which are substantially different from actual WINDOWS 98 environment.
Therefore, it is the main object of the invention to provide an apparatus which emulates a downstream USB device to a USB hub to test whether the USB hub being tested operate normally.
A test apparatus for testing function of a USB hub under the control of a USB host computer is provided. The USB host computer issues a USB command during the test. The test apparatus includes a USB bus, an emulation device, a standard bus and a micro-controller device.
The USB bus is coupled to the USB hub. The emulation device emulates an USB device connected to the USB bus.
The standard bus is connected to the USB host computer. The microcontroller device is connected to the standard bus and the emulation device respectively to process a USB transaction corresponding to the USB command.
The invention provides a testing environment which is fully compliant to the WINDOWS 98 environment.
The advantage and spirit of the invention may be understood by the following recitations together with the appended drawings.